﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ClientPage.Master" AutoEventWireup="true"
    CodeBehind="AskFriendLink.aspx.cs" Inherits="Aij1.AskFriendLink" %>

<asp:Content ID="Content1" ContentPlaceHolderID="chHead" runat="server">
    <style type="text/css">
        .style1 { width: 100%; }
    </style>
    <script language="javascript" type="text/javascript">
// <![CDATA[

        function btnCopy_onclick() {
            $('#txtOurUrl').select();
            if (window.clipboardData) {
                var tempCurLink = $('#txtOurUrl').val();
                var ok = window.clipboardData.setData("Text", tempCurLink);
            }
        }

        function check() {
            if (!$('#txtTitle').val()) {
                alert('站点名称不能为空');
                $('#txtTitle').focus();
                return false;
            }
            if (!$('#txtUrl').val() || $('#txtUrl').val() == 'http://') {
                alert('链接地址不能为空');
                $('#txtUrl').focus();
                return false;
            }
        }

/*
            var r;
            $.ajax({
                type: "GET",            //http请求方式
                url: "CheckCode.ashx",    //服务器段url地址
                data: "CT=GuestBook&Code=" + myfrm.CheckCode.value,           //发送给服务器段的数据
                dataType: "html", //告诉JQuery返回的数据格式
                success: function (msg) { r = msg; }, //定义交互完成，并且服务器正确返回数据时调用的回调函数
                async: false
            });
            if (r == 0) {
                alert('验证码错误,请重新输入验证码');
                myfrm.CheckCode.select();
                $('imgChkCode').src += 1;
                return (false);
            }
        }
*/
// ]]>
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="left" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cph" runat="server">
    <p class="alert">
        <%=Tips %>
    </p>
    <%if (IsPostBack)
      { %>
    <div class="frindLink">
     链接预览:   <a href='<%=Link.Url %>' target="_blank">
            <%=Link.Title%></a>
    </div>
    <%} %>
    <table class="style1">
        <tr>
            <td width="70">
                站点名称:
            </td>
            <td>
                <input id="txtTitle" name="txtTitle" maxlength="10" type="text" value='<%=Link.Title %>' />
                (最多10个字符或汉字)
            </td>
        </tr>
        <tr>
            <td>
                链接地址:
            </td>
            <td>
                <input id="txtUrl" name="txtUrl" maxlength="100" size="50" type="text" value="<%=Link.Url %>" />
            </td>
        </tr>
        <tr>
            <td>
                站点简介:
            </td>
            <td>
                <textarea id="txtIntro" cols="50" name="txtIntro" rows="3"><%=Link.Intro%></textarea>
            </td>
        </tr>
        <%if (CurrentCustomer == null)
          { %>
        <tr valign="middle">
            <td>
                &nbsp;
            </td>
            <td>
                您在登录后才能提出邀请，谢谢！
                <input type="image" style="width: 120px; height: 24px; border: 0" src="http://qzonestyle.gtimg.cn/qzone/vas/opensns/res/img/Connect_logo_3.png"
                    onclick="loginToQQ();return false;" />
            </td>
        </tr>
        <%}
          else
          { %>
        <tr>
            <td height="30">
            </td>
            <td>
                <input name="cmdOk" type="submit" value="提交邀请" onclick="return check()" />
                <input name="cmdReset" type="reset" value="重新填写" />
            </td>
        </tr>
        <%} %>
        <tr>
            <td height="30" colspan="2">
                本站链接代码: <input id="txtOurUrl" size="65" type="text" 
                    value="&lt;a href=&quot;http://www.aij1.com/&quot; target=&quot;_blank&quot;&gt;爱+1亲子摄影馆&lt;/a&gt;" /><input 
                    id="btnCopy" type="button" value="复制" onclick="return btnCopy_onclick()" /></td>
        </tr>
        </table>
</asp:Content>
